import { Service } from 'egg';

class ProductService extends Service {
  async getList(current:number, pageSize:number) {
    const start = (current - 1) * pageSize;
    const end = pageSize * current;
    const data = await this.app.mysql.query('SELECT * FROM loan WHERE loan.state=100 LIMIT ?,?', [ start, end ]);
    return data;
  }
}

module.exports = ProductService;
